<div class="judul_content">Ubah Data Stok</div>
            
<?php
	$id=$_GET['id'];
	$sttmt = $koneksi->query("select * from stok s inner join ukuran u on s.id_ukuran = u.id_ukuran where id_stok = $id");
	$hasil = $sttmt->fetch(PDO::FETCH_ASSOC);
?>
<form class="form" name="form_tambah" method="post" action="utama.php?module=mod_stok&act=update&id=<?php echo $hasil[id_produk]; ?>">
     <ul>
        <li>
            <label>Ukuran</label>
            <select name="ukuran" id="ukuran" class="form">
				<?php
					$ukuran = $koneksi->query("select * from ukuran");
					while($u = $ukuran->fetch(PDO::FETCH_ASSOC)){
						if($u[id_ukuran] == $hasil[id_ukuran]){
							$s = "selected";
						}else{
							$s = "";
						}
						echo "<option value=$u[id_ukuran] $s>$u[ukuran]</option>";
					}
				?>
			</select>
			<input type="hidden" name="id" id="id" value="<?php echo $hasil[id_stok]; ?>">
			<input type="hidden" name="id_produk" id="id_produk" value="<?php echo $hasil[id_produk]; ?>">
        </li>
		<li>
            <label>Stok</label>
            <input type="text" name="stok" id="stok" class="form" size="30" maxlength="5" value="<?php echo $hasil[stok]; ?>">
        </li>
		<li>
			<label>&nbsp;</label>
            <input type="reset" name="reset" value="Reset" class="reset">
			<input type="submit" name="submit" value="Ubah" class="tambah">
		</li>
	</ul>
</form>       